package com.hotel.bean;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    /**
     * 主键
     */
    @Excel(name="ID",needMerge = true)
    private Integer uid;
    /**
     * 姓名
     */
    @Excel(name="姓名",needMerge = true)
    @NotBlank(message = "姓名不能为空")
    private String uname;
    /**
     * 身份证号
     */
    @Excel(name="身份证号码",needMerge = true)
    @NotBlank(message = "身份证号码不能为空")
    private String unumber;
    /**
     * 电话
     */
    @NotBlank(message = "电话不能为空")
    @Excel(name="电话",needMerge = true)
    private String uphone;
    /**
     * 入住房号
     */
    @NotBlank(message = "入住房号不能为空")
    @Excel(name="入住房号",needMerge = true)
    private String rnumber;
    /**
     * 入住时间
     */
    @NotNull(message = "入住时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @Excel(name="入住时间",format = "yyyy-MM-dd", needMerge = true)
    private Date ustart;
    /**
     * 退房时间
     */
    @NotNull(message = "退房时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @Excel(name="退房时间",format = "yyyy-MM-dd",needMerge = true)
    private Date uend;
    /**
     * 状态：1.已入住，2.已退房
     */
    @NotNull(message = "状态不能为空")
    @Excel(name="房间状态",needMerge = true,replace = {"已入住_1", "已退房_2"})
    private Integer ustate;

}
